package com.quanyan.place.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.quanyan.place.entity.TbBizPlaceMember;
import com.quanyan.place.entity.apireq.ReqMemberCardOperate;
import com.quanyan.place.entity.apiresp.RespMemberCardInfo;
import com.quanyan.place.entity.apiresp.RespMemberCardOperate;
import com.quanyan.place.entity.apiresp.RespMemberCardType;
import com.quanyan.place.entity.vo.PlaceMemberTypeVo;
import com.quanyan.place.entity.vo.ReqPlaceMemberSearch;
import com.quanyan.place.entity.vo.TbBizPlaceMemberOpHistoryVo;

/**
 * Created by yangyun on 16-8-27.
 */
public interface VPlaceMemberMapper {

    List<RespMemberCardInfo> selectMemberCardList(@Param("begin") Integer begin,
                                  @Param("pageSize") Integer pageSize,
                                  @Param("placeId") Integer placeId,
                                  @Param("keyWords") String keyWords,
                                  @Param("cardType") Integer cardType,
                                  @Param("status")   Byte status,
                                  @Param("cityId")   Integer cityId,
                                  @Param("placeCode") String placeCode,
                                  @Param("placeName") String placeName,
                                  @Param("orderType") Byte orderType);

    int countPlaceMemberCard(@Param("placeId") Integer placeId,
            @Param("keyWords") String keyWords,
            @Param("cardType") Integer cardType,
            @Param("status")   Byte status,
             @Param("cityId")   Integer cityId,
             @Param("placeCode") String placeCode,
             @Param("placeName") String placeName,
            @Param("orderType") Byte orderType);

    RespMemberCardOperate getMemberStatisticsByPlaceId(ReqMemberCardOperate reqMemberCardOperate);

    List<RespMemberCardOperate> getCardIdPlaceId(ReqMemberCardOperate reqMemberCardOperate);

    int getCardIdCountPlaceId(ReqMemberCardOperate reqMemberCardOperate);

    int getNewCardCount(ReqMemberCardOperate reqMemberCardOperate);

    RespMemberCardOperate getCardAmount(@Param("placeId") Integer placeId,
                                        @Param("isDelete") Integer isDelete);

    RespMemberCardOperate getCardNumbers(@Param("cardType") Integer cardType,
                                         @Param("placeId") Integer placeId,
                                         @Param("isDelete") Integer isDelete);

    int getRespMemberCardTypesCount(PlaceMemberTypeVo placeMemberTypeVo);

    List<RespMemberCardType> getRespMemberCardTypesByTerm(PlaceMemberTypeVo placeMemberTypeVo);

    int countTbBizPlaceMemberOpHistoryVos(ReqMemberCardOperate reqMemberCardOperate);

    List<TbBizPlaceMemberOpHistoryVo> getTbBizPlaceMemberOpHistoryVos(ReqMemberCardOperate reqMemberCardOperate);

    int countSharePlaceMemberCard(ReqPlaceMemberSearch reqMemberSearch);

    List<RespMemberCardInfo> selectSharePlaceMemberCardList(ReqPlaceMemberSearch reqMemberSearch);

    int countPlaceMemberCardByUid(@Param("uid") Integer uid);
    
    List<RespMemberCardInfo> queryPlaceMemberCardByCondition(ReqPlaceMemberSearch reqMemberSearch );
    
    List<RespMemberCardInfo> queryPlaceMemberNumCardByCondition(ReqPlaceMemberSearch reqMemberSearch );
    
    List<TbBizPlaceMember> queryPlaceMemberByCondition(ReqPlaceMemberSearch reqMemberSearch );

}
